import 'package:elephant_fish/http/core/hi_net.dart';
import 'package:elephant_fish/http/request/base_request.dart';
import 'package:elephant_fish/http/request/registar_request.dart';

class RegisterDao{
  static register(String phone,String code,String password,String confirm,
      {String referrer_id}){
    return _rend(phone,code,password,confirm,referrer_id: referrer_id);
  }

  static _rend(String phone, String code, String password, String confirm,{String referrer_id}) async {
    BaseRequest request ;
    request = RegistarRequest();
    request.add('phone', phone)
        .add('code', code)
        .add('password', password)
        .add('confirm', confirm)
        .add('referrer_id', referrer_id);
    var result = await HiNet.getInstance().fire(request);
    print(result);
    return result;

  }
}